import VueRouter from 'vue-router'

// 导入新闻组件
import News from './comments/index/news.vue';
import Detail from './comments/detail/detail.vue';
import Home from './comments/home/home.vue'


var router = new VueRouter({

    routes: [ {
        path:'/',
        redirect:'/news'
    },{
        path: '/news',
        component: News
    },{
        path: '/home',
        component: Home
    },{
        path: '/detail/:id',
        component: Detail
    }]
})

export default router;